import type { IRawMsg } from "@/chatlog_types/IRawMsg";
import type { Chat } from "@/views/Chat";
import type { BaseChatMgr } from "./BaseChatMgr";

export abstract class MessageLoader {
  protected owner: BaseChatMgr;
  constructor(mgr: BaseChatMgr) {
    this.owner = mgr;
  }
  reset?(): void
  abstract load_news(): Promise<Chat.Message<IRawMsg>[]>;
  /**
   * 返回时间降序的消息列表
   */
  abstract load_history(): Promise<Chat.Message<IRawMsg>[]>;
  on_history_accepted?(): void;
  on_news_accepted?(): void;
}
